package com.hulk.ratel.common.constant.enums;

import com.google.common.base.Objects;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author cmt
 *
 */
@AllArgsConstructor
public enum DcreditFlag {
	O("O", "其他"),
	C("C", "贷"),
	D("D", "借");
 	
	@Getter
	private String value;
	@Getter
	private String desc;

	public static String explain(String value) {
		for (DcreditFlag obj : DcreditFlag.values()) {
			if (Objects.equal(value, obj.value)) {
				return obj.desc;
			}
		}
		return value;
	}
	
	@Override
	public String toString() {
		return this.value;
	}

}
